-- GENERATED SPELL FOR [The Black Knight] --


function spell0_33785(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(63003,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33785', 0, 1)
end

function spell1_33785(pUnit, Event) --@Dark Shield,Self--
pUnit:FullCastSpellOnTarget(64505,pUnit)
pUnit:RegisterEvent('Sorts_33785', 8320, 1)
end

function spell2_33785(pUnit, Event) --@Shield-Breaker,n/a--
pUnit:FullCastSpellOnTarget(65147,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33785', 250, 1)
end

function Sorts_33785(pUnit, Event)
local choix_sorts_33785 = math.random(0, 2)
if choix_sorts_33785 == 0 then
pUnit:RegisterEvent('spell0_33785', 1, 1)
end
if choix_sorts_33785 == 1 then
pUnit:RegisterEvent('spell1_33785', 1, 1)
end
if choix_sorts_33785 == 2 then
pUnit:RegisterEvent('spell2_33785', 1, 1)
end
end

function mob33785_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33785', math.random(1500, 3000), 1)
end

function mob33785_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33785_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33785_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33785, 1, 'mob33785_Action')
RegisterUnitEvent(33785, 2, 'mob33785_Leave')
RegisterUnitEvent(33785, 3, 'mob33785_Kill')
RegisterUnitEvent(33785, 4, 'mob33785_Die')
